<template>
  <div class="cy-menu-children" :id="'cyAuchorMenu' + item.key" v-for="(item) in data" :class="{ 'cy-menu-chilidren-active': $props.mValue == item.key }">
    <a  class="menu-item-dot" @click.stop="choseOneMenu(item)">{{ item.name }}</a>
    <template v-if="item.children && item.children.length">
      <MenuListItem :data="item.children" :mValue="mValue" @choseOneMenu="choseOneMenu" ></MenuListItem>
    </template>
  </div>
</template>

<script setup>
import MenuListItem from './menuListItem.vue'
defineProps({
  data: Array,
  mValue: [String, Number],
})
const emit=defineEmits(['choseOneMenu'])
// 点击菜单
const choseOneMenu = (info) => {
  emit('choseOneMenu', info)
}
</script>

<style lang="scss" scoped>
@import './index.scss';
</style>